package h0712;

import java.util.Scanner;
/**
  * @description 工号不够用了怎么办
  * @author 不知名帅哥
  * @date 2024/7/12 22:52
  * @version 1.0
*/
public class JobNumber {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num = sc.nextInt();
        int letters=sc.nextInt();

        long i = (long) (num / Math.pow(26,letters)); //pow求某个数字的幂
        long res = (long) Math.ceil(Math.log10(i)); //向上取整
        System.out.println(res);

    }
}
